
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <base href="${pageContext.servletContext.contextPath}/" }>
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="static/lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="static/css/layui/public.css" media="all">
</head>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
        <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>
    </div>
</div>
<script src="static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script>
    layui.use(['form', 'table'], function () {
        var $ = layui.jquery,
            form = layui.form,
            table = layui.table;
        table.render({
            elem: '#currentTableId',
            url: 'queryDataList',
            toolbar: '#toolbarDemo',
            height: 500,
            defaultToolbar: ['filter', 'exports', 'print', {
                title: '提示',
                layEvent: 'LAYTABLE_TIPS',
                icon: 'layui-icon-tips'
            }],
            cols: [[
                {field: 'id', width: 200, title: 'ID', sort: true},
                {field: 'outTradeNo', width: 200, title: '流水号'},
                {field: 'tradeNo', width: 150, title: '交易订单号', sort: true},
                {field: 'totalAmount', width: 150, title: '交易金额', sort: true},
                {field: 'tradeDate', width: 200, title: '订单时间', sort: true},
                {field: 'tradeStatus', width: 150, title: '订单状态', sort: true,templet:'#setStatus'}
            ]],
            limits: [10, 15, 20, 25, 50, 100],
            limit: 15,
            skin: 'line'
        });
    });
</script>


<script type="text/html" id="setStatus">
    <%--    按钮默认关--%>
    <input type="checkbox" name="close" id="{{d.tradeStatus}}"
           {{#  if(d.tradeStatus === 0){ }}
           {{#  } else { }}
           checked=""
           {{#  } }}
           lay-skin="switch" lay-text="交易成功|交易失败"  lay-filter="switchTest" disabled>
</script>

</body>
</html>
